#!/bin/bash

if [ $# -eq 1 ];then
    docker build -t hub.docker.com/rtc/rtc-{service}:$1 -f cicd/Dockerfile.release ./ && echo build hub.docker.com/rtc/rtc-{service}:$1 OK

    docker push hub.docker.com/rtc/rtc-{service}:$1 && echo push hub.docker.com/rtc/rtc-{service}:$1 OK

    exit 0
fi

docker build -t rtc-{service} -f cicd/Dockerfile.debug ./
# docker build --platform linux/amd64 -t hub.docker.com/rtc/rtc-{service} -f cicd/Dockerfile.release ./
